@import "@/styles/__index.less";

.list-item {
  height: 150px;
  padding: 20px 0px;
  box-sizing: border-box;
  border-bottom: 1px solid #C0D6F8;
  display: flex;

  &.route,
  &.route2 {
    height: 150px;

    .imageBox {
      //flex: 3;
      background-color: #ccc;
      border-radius: 10px;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
    }
    .image {
      height: 100%;
      width: 100%;
      object-fit: fill;
    }
    .iframe{
      border: none;
      width: 190px;
      height: 87px;
      align-self: center;
    }
  }

  &.route {
    .infos .title {
      &::before {
        content: "";
        //display: inline-block;
        width: 4%;
        height: 16px;
        margin-right: 3%;
        background: linear-gradient(0deg, #579FFF 0%, #FFFFFF 100%);
        border-radius: 3px;
      }
    }
    &.active{
      .infos .title {
        color: #FACE96;
        &::before {
          content: "";
          //display: inline-block;
          width: 4%;
          height: 16px;
          margin-right: 3%;
          background: linear-gradient(0deg, #F0B05E 0%, #FFFFFF 100%);
          border-radius: 3px;
        }
      }
      .imageBox{
        border: 2px solid #FACE96;
      }
    }

  }

  .infos {
    //flex: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    .title {
      color: #B7FFFF;
      font-weight: bold;
      font-size: 16px;
      display: flex;
      align-items: center;

      .text{
        white-space: nowrap; /* 强制文本不换行 */
        text-overflow: ellipsis; /* 在超出部分显示省略号 */
        overflow: hidden;
      }
    }

    .date {
      font-size: 12px;
    }
  }

  .image {
    height: 100%;
    //width: 100%;
    //background-color: #ccc;
    border-radius: 10px;
    //background-size: cover;
    //background-position: center;
    //background-repeat: no-repeat;
  }
  .imageBox{

    overflow: hidden;//img如果超出这个div会隐藏超出部分
    display: flex;//flex布局
    align-items: center;//让img放在div的中间，居中
    justify-content: center;
    //flex: 5;
    width: 50%;
    height: 100%;
    img{
      object-fit: contain;
    }
  }
}
